﻿/*
 Lop nay la lop Model co so. Bao gom cac ham nhu la ket noi co so du lieu, tra ve ket qua, tuy bien ket qua tra ve v.v...
 * Tat ca cac lop trong thu muc model ma co lien quan toi co so du lieu deu ke thua tu lop nay.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace UnionManager.Models
{
    public class BaseModel
    {
        private UnionManagerEntities db = new UnionManagerEntities();
        public UnionManagerEntities DB
        {
            get { return db; }
            set { db = value; }
        }

        //Luu thay doi vao co so du lieu
        public void CommitChanges()
        {
            DB.SaveChanges();
        }
    }
}